USE [SRD]
GO

/****** Object:  Table [dbo].[PROFISSIONAL]    Script Date: 05/14/2011 11:00:15 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[PROFISSIONAL](
	[PROFISSIONAL_ID] [int] IDENTITY(1,1) NOT NULL,
	[NM_PROFISSIONAL] [nvarchar](70) NOT NULL,
	[CPF] [nvarchar](11) NOT NULL,
	[RG] [nvarchar](20) NULL,
	[EMAIL] [nvarchar](50) NOT NULL,
	[LOGIN] [nvarchar](30) NOT NULL,
	[SENHA] [nvarchar](10) NOT NULL,
	[EMPRESA_ID] [int] NOT NULL,
	[CARGO_ID] [int] NOT NULL,
	[SETOR_ID] [int] NOT NULL,
	[LIDER_ID] [int] NOT NULL,
	[ATIVO] [char](1) NOT NULL,
 CONSTRAINT [PK_PROFISSIONAL] PRIMARY KEY CLUSTERED 
(
	[PROFISSIONAL_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[PROFISSIONAL]  WITH CHECK ADD  CONSTRAINT [FK_PROFISSIONAL_CARGO] FOREIGN KEY([CARGO_ID])
REFERENCES [dbo].[CARGO] ([CARGO_ID])
GO

ALTER TABLE [dbo].[PROFISSIONAL] CHECK CONSTRAINT [FK_PROFISSIONAL_CARGO]
GO

ALTER TABLE [dbo].[PROFISSIONAL]  WITH CHECK ADD  CONSTRAINT [FK_PROFISSIONAL_EMPRESA] FOREIGN KEY([EMPRESA_ID])
REFERENCES [dbo].[EMPRESA] ([EMPRESA_ID])
GO

ALTER TABLE [dbo].[PROFISSIONAL] CHECK CONSTRAINT [FK_PROFISSIONAL_EMPRESA]
GO

ALTER TABLE [dbo].[PROFISSIONAL]  WITH CHECK ADD  CONSTRAINT [FK_PROFISSIONAL_SETOR] FOREIGN KEY([SETOR_ID])
REFERENCES [dbo].[SETOR] ([SETOR_ID])
GO

ALTER TABLE [dbo].[PROFISSIONAL] CHECK CONSTRAINT [FK_PROFISSIONAL_SETOR]
GO


